package com.ruoyi.training.service.impl;

import java.util.List;

import com.ruoyi.training.dto.BatchCheckStatusDto;
import com.ruoyi.training.dto.CheckInQueryDto;
import com.ruoyi.training.vo.CheckInVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.training.mapper.PracticeCheckInMapper;
import com.ruoyi.training.domain.PracticeCheckIn;
import com.ruoyi.training.service.IPracticeCheckInService;

/**
 * 实践预约签到Service业务层处理
 * 
 * @author WorrilessGo
 * @date 2025-10-14
 */
@Service
public class PracticeCheckInServiceImpl implements IPracticeCheckInService 
{
    @Autowired
    private PracticeCheckInMapper practiceCheckInMapper;

    /**
     * 查询实践预约签到
     * 
     * @param practiceCheckId 实践预约签到主键
     * @return 实践预约签到
     */
    @Override
    public PracticeCheckIn selectPracticeCheckInByPracticeCheckId(String practiceCheckId)
    {
        return practiceCheckInMapper.selectPracticeCheckInByPracticeCheckId(practiceCheckId);
    }

    /**
     * 查询实践预约签到列表
     * 
     * @param practiceCheckIn 实践预约签到
     * @return 实践预约签到
     */
    @Override
    public List<PracticeCheckIn> selectPracticeCheckInList(PracticeCheckIn practiceCheckIn)
    {
        return practiceCheckInMapper.selectPracticeCheckInList(practiceCheckIn);
    }

    /**
     * 新增实践预约签到
     * 
     * @param practiceCheckIn 实践预约签到
     * @return 结果
     */
    @Override
    public int insertPracticeCheckIn(PracticeCheckIn practiceCheckIn)
    {
        return practiceCheckInMapper.insertPracticeCheckIn(practiceCheckIn);
    }

    /**
     * 修改实践预约签到
     * 
     * @param practiceCheckIn 实践预约签到
     * @return 结果
     */
    @Override
    public int updatePracticeCheckIn(PracticeCheckIn practiceCheckIn)
    {
        return practiceCheckInMapper.updatePracticeCheckIn(practiceCheckIn);
    }

    /**
     * 批量删除实践预约签到
     * 
     * @param practiceCheckIds 需要删除的实践预约签到主键
     * @return 结果
     */
    @Override
    public int deletePracticeCheckInByPracticeCheckIds(String[] practiceCheckIds)
    {
        return practiceCheckInMapper.deletePracticeCheckInByPracticeCheckIds(practiceCheckIds);
    }

    /**
     * 删除实践预约签到信息
     * 
     * @param practiceCheckId 实践预约签到主键
     * @return 结果
     */
    @Override
    public int deletePracticeCheckInByPracticeCheckId(String practiceCheckId)
    {
        return practiceCheckInMapper.deletePracticeCheckInByPracticeCheckId(practiceCheckId);
    }

    /**
     * 通过条件搜索查询实践预约签到列表
     */
    @Override
    public List<CheckInVO> searchCheckIn(CheckInQueryDto checkInQueryDto) {
        return practiceCheckInMapper.searchCheckIn(checkInQueryDto);
    }

    /**
     * 批量修改签到状态
     * lqx
     */
    @Override
    public int batchUpdateStatus(BatchCheckStatusDto batchCheckStatusDto) {
        return practiceCheckInMapper.batchUpdateStatus(batchCheckStatusDto);
    }
}
